package com.linkage.lcims.base.po.system;

import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;


/** @author Hibernate CodeGenerator */
@SuppressWarnings("serial")
public class MBandwidthPK implements Serializable {

    /** identifier field */
    private Integer servicetype;

    /** identifier field */
    private Integer widthno;

    /** full constructor */
    public MBandwidthPK(Integer servicetype, Integer widthno) {
        this.servicetype = servicetype;
        this.widthno = widthno;
    }

    /** default constructor */
    public MBandwidthPK() {
    }

    /** 
     *                @hibernate.property
     *                 column="servicetype"
     *             
     */
    public Integer getServicetype() {
        return this.servicetype;
    }

    public void setServicetype(Integer servicetype) {
        this.servicetype = servicetype;
    }

    /** 
     *                @hibernate.property
     *                 column="widthno"
     *             
     */
    public Integer getWidthno() {
        return this.widthno;
    }

    public void setWidthno(Integer widthno) {
        this.widthno = widthno;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("servicetype", getServicetype())
            .append("widthno", getWidthno())
            .toString();
    }

    public boolean equals(Object other) {
        if ( (this == other ) ) return true;
        if ( !(other instanceof MBandwidthPK) ) return false;
        MBandwidthPK castOther = (MBandwidthPK) other;
        return new EqualsBuilder()
            .append(this.getServicetype(), castOther.getServicetype())
            .append(this.getWidthno(), castOther.getWidthno())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getServicetype())
            .append(getWidthno())
            .toHashCode();
    }

}
